package cc.yaomm.common.basic.enums;

import cc.yaomm.common.basic.base.SuperEnum;
import lombok.Getter;

/**
 * Created by XQL on 2020/8/20.
 */
@Getter
public enum ResponseCode implements SuperEnum<ResponseCode, String> {
    /**
     * 成功
     */
    SUCCESS("SUCCESS", 200, "成功"),
    /**
     * 失败
     */
    FAILED("FAILED", 400, "失败"),
    /**
     * 异常
     */
    EXCEPTION("EXCEPTION", 500, "异常"),
    /**
     * 登录无效
     */
    LOGIN_INVALID("LOGIN_INVALID", 401, "登录无效");

    private String value;

    private Integer status;

    private String name;

    ResponseCode(String value, Integer status, String name) {
        this.value = value;
        this.status = status;
        this.name = name;
    }

    @Override
    public ResponseCode[] enums() {
        return values();
    }
}
